package d4_safe2;

public class DrawThread extends Thread{
    private Account account;

    public String getThreadName() {
        return threadName;
    }

    public void setThreadName(String threadName) {
        this.threadName = threadName;
    }

    private String threadName;



    public DrawThread(String name, Account account) {
        this.account = account;
        threadName = name;
        System.out.println("Creating " +  threadName );
    }
    @Override
    public void run() {
        account.drawMoney(100000);

    }
}
